package com.gxa.zhonglong.service.impl;

import com.gxa.zhonglong.mapper.PurchaseReturnMapper;
import com.gxa.zhonglong.pojo.PurchaseReturn;
import com.gxa.zhonglong.pojo.Storage;
import com.gxa.zhonglong.service.PurchaseReturnService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.sql.Timestamp;
import java.util.List;

@Service("purchaseReturnService")

public class PurchaseReturnServiceImpl implements PurchaseReturnService {

    @Autowired
    PurchaseReturnMapper purchaseReturnMapper ;

    @Override
    public void add(PurchaseReturn purchaseReturn) {
        purchaseReturnMapper.add(purchaseReturn);

    }

    @Override
    public List<Storage> getListByID(List<String> numbers) {
        List<Storage> listByID = purchaseReturnMapper.getListByID(numbers);
        return listByID;
    }

    @Override
    public PurchaseReturn selectByNum(String num) {
        return purchaseReturnMapper.selectByNum(num);
    }

    @Override
    public void reject(String ename, Timestamp etime,String num) {
        purchaseReturnMapper.reject(ename,etime,num);
    }

    @Override
    public void approve(String ename, Timestamp etime,String num) {
        purchaseReturnMapper.approve(ename,etime,num);
    }

    @Override
    public void revokeReject(String num) {
        purchaseReturnMapper.revokeReject(num);
    }

    @Override
    public void delete(String num) {
        purchaseReturnMapper.delete(num);
    }
}
